#define  _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	int arr1[2][3] = { 0 };
	int arr2[3][2] = { 0 };

	scanf("%d %d %d", arr1[0], arr1[0]+1, arr1[0]+2);
	scanf("%d %d %d",arr1[1], arr1[1]+1, arr1[1]+2);

	int i = 0;
	for (i = 0; i < 3; i++)
	{
		arr2[i][0] = arr1[0][i];
	}
	for (i = 0; i < 3; i++)
	{
		arr2[i][1] = arr1[1][i];
	}
	for (i = 0; i < 3; i++)
	{
		int j = 0;
		for (j = 0; j < 2; j++)
		{
			printf("%d ", arr2[i][j]);
		}
		printf("\n");
	}
	return 0;
}